<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class greg_month</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../date_time/doxy.html#doxygen.gregorian_reference.greg__month_8hpp" title="Header &lt;boost/date_time/gregorian/greg_month.hpp&gt;">
<link rel="prev" href="structboost_1_1gregorian_1_1bad__month.html" title="Struct bad_month">
<link rel="next" href="greg__serialize_8hpp_1a820d06c46f5be2355665318dfdf07816.html" title="Function BOOST_DATE_TIME_SPLIT_FREE">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1gregorian_1_1bad__month.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#doxygen.gregorian_reference.greg__month_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greg__serialize_8hpp_1a820d06c46f5be2355665318dfdf07816.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class greg_month</span></h2>
<p>boost::gregorian::greg_month — Wrapper class to represent months in gregorian based calendar. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../date_time/doxy.html#doxygen.gregorian_reference.greg__month_8hpp" title="Header &lt;boost/date_time/gregorian/greg_month.hpp&gt;">boost/date_time/gregorian/greg_month.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html" title="Class greg_month">greg_month</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">greg_month_rep</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">date_time</span><span class="special">::</span><span class="identifier">months_of_year</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1aeceebbee9f83834a130f940adcc7ad7b"></a><span class="identifier">month_enum</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#id-1_3_11_15_4_12_1_1_2_4-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a52b873098e83de21ae61d4ccf62df5ec"><span class="identifier">greg_month</span></a><span class="special">(</span><span class="identifier">month_enum</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a2b39b80647cb03fe2b3601f8538c544f"><span class="identifier">greg_month</span></a><span class="special">(</span><span class="identifier">value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ad1e06a5f7d5636704621e0c4f6d416d1"><span class="keyword">operator</span> <span class="identifier">value_type</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">value_type</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a4eb04e4553202c5cbb7ddf8dcbb7f644"><span class="identifier">as_number</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">month_enum</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a98722ff80a2ee22c0f83f32aa9eabb88"><span class="identifier">as_enum</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a987483cb063ac3efb3d7fb0fb26ca9c1"><span class="identifier">as_short_string</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1adaeb220a4778261a4712975e4b96c62f"><span class="identifier">as_long_string</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a48d2333a631d60c51c6bb9b3acd987f7"><span class="identifier">as_short_wstring</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ada42bd4a2124fc732bd6fcb9b8a475dd"><span class="identifier">as_long_wstring</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ab5674a8d841fc0038c7d9d4a4a079e08"><span class="identifier">as_short_string</span></a><span class="special">(</span><span class="keyword">char</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a612e9ff92d3a6039b3d9a84420a7255e"><span class="identifier">as_long_string</span></a><span class="special">(</span><span class="keyword">char</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a56991006b4c1f3136f8519d97ef2cffd"><span class="identifier">as_short_string</span></a><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a class="link" href="classboost_1_1gregorian_1_1greg__month.html#doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1accf0817a4d48763355ec94aff97957ed"><span class="identifier">as_long_string</span></a><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.11.15.4.12.4.4"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.3.11.15.4.12.4.4.2"></a><h3>
<a name="id-1_3_11_15_4_12_1_1_2_4-bb"></a><code class="computeroutput">greg_month</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a52b873098e83de21ae61d4ccf62df5ec"></a><span class="identifier">greg_month</span><span class="special">(</span><span class="identifier">month_enum</span> theMonth<span class="special">)</span><span class="special">;</span></pre>Construct a month from the months_of_year enumeration. </li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a2b39b80647cb03fe2b3601f8538c544f"></a><span class="identifier">greg_month</span><span class="special">(</span><span class="identifier">value_type</span> theMonth<span class="special">)</span><span class="special">;</span></pre>Construct from a short value. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ad1e06a5f7d5636704621e0c4f6d416d1"></a><span class="keyword">operator</span> <span class="identifier">value_type</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Convert the value back to a short. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">value_type</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a4eb04e4553202c5cbb7ddf8dcbb7f644"></a><span class="identifier">as_number</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns month as number from 1 to 12. </li>
<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">month_enum</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a98722ff80a2ee22c0f83f32aa9eabb88"></a><span class="identifier">as_enum</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a987483cb063ac3efb3d7fb0fb26ca9c1"></a><span class="identifier">as_short_string</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns 3 char english string for the month ex: Jan, Feb, Mar, Apr. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1adaeb220a4778261a4712975e4b96c62f"></a><span class="identifier">as_long_string</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns full name of month as string in english ex: January, February. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a48d2333a631d60c51c6bb9b3acd987f7"></a><span class="identifier">as_short_wstring</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns 3 wchar_t english string for the month ex: Jan, Feb, Mar, Apr. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ada42bd4a2124fc732bd6fcb9b8a475dd"></a><span class="identifier">as_long_wstring</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns full name of month as wchar_t string in english ex: January, February. </li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1ab5674a8d841fc0038c7d9d4a4a079e08"></a><span class="identifier">as_short_string</span><span class="special">(</span><span class="keyword">char</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a612e9ff92d3a6039b3d9a84420a7255e"></a><span class="identifier">as_long_string</span><span class="special">(</span><span class="keyword">char</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1a56991006b4c1f3136f8519d97ef2cffd"></a><span class="identifier">as_short_string</span><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> <a name="doxygen.gregorian_reference.classboost_1_1gregorian_1_1greg__month_1accf0817a4d48763355ec94aff97957ed"></a><span class="identifier">as_long_string</span><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2001-2005 CrystalClear Software, Inc<p>Subject to the Boost Software License, Version 1.0. (See accompanying file
    <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1gregorian_1_1bad__month.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#doxygen.gregorian_reference.greg__month_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greg__serialize_8hpp_1a820d06c46f5be2355665318dfdf07816.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
